<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{$username}界面</title>
<style>

div{
	margin:0px;
	margin-left:auto;
	margin-right:auto;
	/*border:solid ;
	border-color:#Ff0000;*/
	}
body {
	background:#ffffff;
	margin:0px;	
	margin-left:2%;
}
a {
	text-decoration: none;
	color:#036e6c;
	font-weight:bold;
	font-size:9pt;
}
input{
	background:#f2fbfe;
	}
#manager_title{
	width:98%;
	margin-left:2%;
	height:34px;
	}	
.acbu{
	margin-left:3%;
	margin-top:8px;
	height:80%;
	width:50px;
	background:#087db6;
	float:left;
	}	
.title_b{
	height:34px;
	float:left;
	cursor:pointer;
	}	
.record{
	width:98%;
	height:40px;
	float:left;
	}	
.record div{
	margin-left:3%;
	}
.upd{
	color:#b9b9b9;
	font-style:oblique;
	height:40px;
	float:left;
	line-height:40px;
	}
.ce{
	width:60%;
    font-size:14pt;
	}	
.ti{
	width:33%;
	}
.de_c{
	width:90%;
	height:28px;
	}	
.select_page{
	background-color:#999;
	}		
.options{
	height:34px;
	width:170px;
	border-bottom:dotted #e3e3e3 1px;
	cursor:pointer;
	}
.myfontstyle{
    font-family:'黑体';
    letter-spacing:1px;
}
			
</style>
<script type="text/javascript" src="../Public/js/jquery-1.7.1.min.js"></script>
</head>
<script type="text/javascript">
$(document).ready(function(){  
    $("#shareContent").keydown(function(){  
        var curLength=$("#shareContent").val().length;   
        if(curLength>=25){  
            var num=$("#shareContent").val().substr(0,25);  
            $("#shareContent").val(num);  
            alert("超过字数限制，多出的字将被截断!");  
        }  
        else{  
            var no = $("#shareContent").val().length;
            no=no+"/25";
            $("#textCount").text(no);  
        }  
    })  
});
 function addShare()
 {
    var contents = $('#shareContent').val();
    $.post("{:U('Child/addShare')}",{content:contents},function(data){
        var jsonObj = $.parseJSON(data);
        $('#dayshare').html(jsonObj.data['content']+"&nbsp;&nbsp&nbsp;&nbsp;<b style='font-size:8pt;'>"+jsonObj.data['ctime']+"</b>"); 
        $('#shareContent').attr('value','');
        });
 }
   function selectitem1(index){
   switch(index){
    case 0:
    window.location.href="{:U('Public/tohome')}"
    break;
    case 1:
    window.location.href="{:U('Upload/uploadpicture')}"
    break;
    case 2:
    window.location.href="{:U('Note/addBlog')}"
    break;
    case 3:
    window.location.href="{:U('First/Index')}"
    break;
    case 4:
    window.location.href="{:U('Favorite/Index')}"
    break;
    case 5:
    window.location.href="{:U('Video/addVideo')}"
    break;
    case 6:
    window.location.href="{:U('Growth/Index')}"
    break;
    case 7:
    window.location.href="{:U('Timeshow/Index')}"
    break;
   }
}
 function selectitem(index)
 {
   switch(index)
   {
    case 1:
    window.location.href="{:U('Upload/showAlbum')}"
    break;
    case 2:
    window.location.href="{:U('Note/notelist')}"
    break;
    case 3:
    window.location.href="{:U('First/Index')}"
    break;
    case 4:
    window.location.href="{:U('Favorite/Index')}"
    break;
    case 5:
    window.location.href="{:U('Video/addVideo')}"
    break;
    case 6:
    window.location.href="{:U('Growth/Index')}"
    break;
    case 8:
    window.location.href="{:U('Timeshow/Index')}"
    break;
    case 8:
    window.location.href="{:U('Child/change_info')}"
    break;
   }
}
function getInfo()
{
    $('#showinfo').css('display','none');
    $('#showinfo').css('height','0');
    var userid = $('#userid').val();
    $('#userinfo').css('display','block');
    $.post("{:U('Child/getInfo')}",{userid:userid},function(data){
    var jsonObj = $.parseJSON(data);
    var str="<table style ='margin-left:%5;color:#6B6B6B' cellpadding='2'><tr><td style='width:85px;'><b style='color:#047f80;'>昵&nbsp;&nbsp;&nbsp;称：</b></td><td style='width:200px;'>";
    str+=jsonObj.data['nick']+"</td><td style='width:85px;'><b style='margin-left:2%;color:#047f80;'>省市医院：</b></td><td style='width:100px;'>";
    str+=jsonObj.data['province']+"</td></tr><tr><td><b style='margin-left:2%;color:#047f80;'>名字寓意:</b></td><td colspan='3'>";
    str+=jsonObj.data['namemean']+'  '+jsonObj.data['hospital'];
    str+="</td></tr><tr><td><b style='margin-left:2%;color:#047f80;'>眼睛颜色：</b></td><td>";
    str+=jsonObj.data['eyecolor']+"<td><b style='margin-left:2%;color:#047f80;'>眼睛颜色：</b></td><td>";
    str+=jsonObj.data['haircolor']+"</td></tr><tr><td><b style='color:#047f80;'>学校老师：</b></td><td>";
    str+=jsonObj.data['school']+'幼儿园, '+jsonObj.data['teacher']
    str+="</td><td><b style='margin-left:2%;color:#047f80;'>兴趣爱好：</b></td><td>"+jsonObj.data['activity']+"</td>";
    str+="</tr><tr><td><b style='margin-left:2%;color:#047f80;'>其&nbsp;&nbsp;&nbsp;他：</b></td><td>"+jsonObj.data['special']+"</td><td><img src='../Public/images/first/delete.png' style='margin-left:2%;margin-top:3px;' onclick = 'closeinfo()' />"
    str+="</td></tr></table>";
    $('#userinfo').html(str);
});
     
}
function modifyInfo()
{    
  window.location.href="{:U('Child/change_info')}";  
}
function closeinfo()
{    
  $('#showinfo').css('display','block');
  $('#userinfo').css('display','none'); 
}
 function toPicture(picid){
    var url = "fullshow/picid/"+picid;
    window.location.href="{:U('"+url+"')}";
    }  
 function selectArticle(id){
    var url="noteinfo/n_id/"+id;
    window.location.href="{:U('"+url+"')}";
}
function changeHead()
{
   $('#headchange').css('display','block'); 
}
function closeChange()
{
   $('#headchange').css('display','none'); 
}
</script>
<body>
<div style="width:100%;margin-top:2%;height:100%;">
	<div id="manager_title">
       <div class="title_b" style="background:url(../Public/child/image/flush.png) no-repeat;width:74px;"></div>
       <div class="title_b" style="background:url(../Public/child/image/magzine.png) no-repeat;width:57px;" onclick="selectitem(2)"></div>
       <div class="title_b" style="background:url(../Public/child/image/photo.png) no-repeat;width:57px;" onclick="selectitem(1)"></div>
       <div class="title_b" style="background:url(../Public/child/image/video.png) no-repeat;width:57px;" onclick="selectitem(5)"></div>
        <div class="title_b" style="background:url(../Public/child/image/favorite.png) no-repeat;width:57px;" onclick="selectitem(4)"></div>        
       <div class="title_b" style="background:url(../Public/child/image/first.png) no-repeat;width:63px;" onclick="selectitem(3)"></div>    
       <div class="title_b" style="background:url(../Public/child/image/increase.png) no-repeat;width:79px;" onclick="selectitem(6)"></div>
       <div class="title_b" style="background:url(../Public/child/image/timeshow.png) no-repeat;width:79px;" onclick="selectitem(8)"></div>
       <div class="title_b" style="background:url(../Public/child/image/details.png) no-repeat;width:57px;" onclick="getInfo()"></div>   
    </div>
    
<div id='main' style="float:left;width:67%;">  
  <div style="margin-top:2%;"><input id="userid" value="{$user.u_id}" style="display: none;"/></div>
  <div style="background:#E2F4FD;height:160px;width:98%;margin-left:2%;">
        <div style="height:40%;width:100%;">
            <div id='childmain' style="float:left;width:100%;height:80%;margin-top:15px;">
				<div id="childname" style="width:10%;border-right:solid thin #b9b9b9;height:40px;float:left; text-align:left;line-height:40px;margin-left:2%;font-weight:bold;color:#6c6c6c;font-size:14pt;">{$username}</div>
                <div style="margin-left:3px;line-height:40px; font-size:15pt;color:#6c6c6c;height:40px;;width:86%;float:left;">
					<div style="width:16px;height:40px;background:url(../Public/child/image/birthcake.png) center center no-repeat;float:left;"></div>
					   <div id="dayshare"  style="text-align:inherit;margin-top:3px;color:#357170;font-size:11pt;letter-spacing:1px;font-family:'黑体';"><span>{$shareList.content}</span>&nbsp;&nbsp;<span style="font-size:8pt;">{$shareList.ctime}</span></div>
					
			   </div>
			</div>
        </div>
        <!-- 第一栏结束-->
        <div style="height:60%;border:1px solid #dcdfda;border-left:none;border-right:none;background:#f2fafa;width:100%;">
        	<div style="width:100%;height:100%;margin-top:5px;">
            	<input type="text"  id="shareContent" style="height:48%;width:70%;margin-left:3%;margin-top:4%;float:left; font-size:13pt;color:#b9b9b9;background:#f2fafa;" onfocus="this.value=''" value="在这里分享我们每天喜怒哀乐！" />
                <div style="background:url(../Public/child/image/sharing.png) no-repeat center center; width:20%;height:100%;float:left;" onclick="addShare()"></div>
                <div id="textCount" class="myfontstyle" style="clear:right;float:right;width:5%;margin-right:1%;font-size:8pt;color:#b9b9b9;">0/25</div>
            </div>
        </div>
       
    </div>
    <div class="myfontstyle" id="userinfo" style="display:none;margin-left:20px;width:67%;font-size:8pt;"></div>
<div id="showinfo" style="width:100%;height:180px;margin-left:2%;">
    <div class="record" style="background:#f3f3f3;">
    	<div style="width:16px;height:40px;background:url(../Public/child/image/smile.png) center center no-repeat;float:left;"></div>
		<div style="float:left; text-align:left;font-weight:bold;color:#616163;line-height:40px;">随便写些什么东西在这里</div>
    </div>
    <div class="record"></div>
    
    <div class="record"><div class="upd ce"><img src="../Public/upload/{$plist.ph_name}" style="width:100px;height:50px;cursor:pointer;" onclick="toPicture({$plist.id})" /></div>
    <div class="upd ti">{$plist.ctime}</div></div>
    <div class="record"><div id="shareid" class="upd ce"></div>
    <div id="timeid" class="upd ti"></div></div>
    <div class="record"><div class="upd ce" style="cursor:pointer;" onclick="selectArticle({$nlist.n_id})">{$nlist.title}</div>
    <div class="upd ti">{$nlist.ctime}</div></div>
</div>   
    
    
</div>
    <div style="float:left;width:6%;background:url(../Public/child/image/m_line.png) no-repeat right center;height:600px; "></div>

<div style="float:left;width:27%;">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><div style="background:url(../Public/child/image/head_img.png) no-repeat top center;width:170px;height:185px"><img src="../Public/upload/head/{$user.picture}" style="width:170px;height:185px"/></div></td>
  </tr>
  <tr>
    <td><div style="width:150px;margin-top:10px;"><div style="width:67px;height:16px;background:url(../Public/child/image/cimg.png) no-repeat; cursor:pointer;float:left;" onclick="changeHead()"></div>&nbsp;<div style="width:67px;height:16px;background:url(../Public/child/image/update.png) no-repeat; cursor:pointer;float:right" onclick="modifyInfo()"></div></div></td>
  </tr>
  <!--显示修改头像-->
  <form id="form1" name="form1" method="post" action="{:U('Public/headPhoto')}" enctype="multipart/form-data"> 
  <tr id="headchange" style="display: none;"><td><input type="file" name="photo" style="margin-left: 50px;width:70px;cursor:pointer;"/> <input name="describe" type="submit" value="上传" style="margin-left:5px;width:40px;height:23px;cursor:pointer;color:#047f80;font-family:'黑体';" /><input name="describe" type="reset" value="放弃" onclick="closeChange()" style="margin-left:5px;width:40px;height: 23px;cursor:pointer;color:#047f80;font-family:'黑体';" /></td></tr>
  </form>

  <tr>
  <tr>
    <td ><div  style="background:url(../Public/child/image/v_line.png) bottom left repeat-x;width:180px;height:7px;"></div></td>
  </tr>
 
  <tr>
    <td>
		<div  id="role" style="background:url(../Public/child/image/v_line.png) bottom left repeat-x;width:170px;">
    	<div class="options" style="background:url(../Public/child/image/home.png) no-repeat;" onclick="selectitem1(0)"></div>	
    	<div class="options" style="background:url(../Public/child/image/addnote.png) no-repeat;" onclick="selectitem1(2)"></div>	
    	<div class="options" style="background:url(../Public/child/image/addphoto.png) no-repeat;" onclick="selectitem1(1)"></div>	
    	<div class="options" style="background:url(../Public/child/image/addvideo.png) no-repeat;" onclick="selectitem1(5)"></div>	
    	<div class="options" style="background:url(../Public/child/image/addfavourite.png) no-repeat;" onclick="selectitem1(4)"></div>	
       	<div class="options" style="background:url(../Public/child/image/marker.png) no-repeat;" onclick="selectitem1(3)"></div>	
    	<div class="options" style="background:url(../Public/child/image/grow.png) no-repeat;" onclick="selectitem1(6)"></div>	
    	<div class="options" style="background:url(../Public/child/image/time.png) no-repeat;" onclick="selectitem1(7)"></div>		
		</div>
    </td>
  </tr>
</table>
</div>
</div> 
<img src="../Public/child/image/flower.png" style="position:absolute;right:0;bottom:0; z-index:-50;" />
</body>
</html>